#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main(){
    int i;
    char* str=(char*)malloc(10001*sizeof(char));//yes i just want to try it
    size_t len;
    char *fl=str;
    char *af=str;
    if(str==NULL)
    {
        perror("malloc");
        return 1;
    }
    fgets(str,10001,stdin);//standed string getin way
    len=strlen(str);
    if(str[len-1]=='\n')
    {
        str[len-1]='\0';
        len--;
    }//check the \n and put EOF
    while(*fl!='\0')
    {
        if(*fl!=' ')
        {
            *af=*fl;
            af++;
        }
        else len--;
        fl++;
    }
    for(i=0;i<len;i++)
    printf("%c",*(af-len+i));
    free(str);
    return 0;
}